1. Field of the Invention The present invention relates to an image taking apparatus such as a digital camera, an image processing apparatus, an image processing method and a recording medium.
2. Description of Related Art Some of digital cameras are designed to take images in a pan-focus image mode. In this pan-focus image mode, a pan-focus image, i.e., an image focused on each of different photographic objects, can be formed from a plurality of images different in focal distance, such as a foreground image and a background image.
By the way, in creating a pan-focus image, as shown in FIG. 16A, when the third photographic object R whose image will be out of focus exists between the foreground and background photographic objects P and Q whose images are to be taken by a digital camera 200, only the photographic object R will be unfocused, causing an unnatural image as a whole. As a result, an appropriate pan-focus image cannot be obtained. Furthermore, in cases where the depth of field 30 is deep, when the foreground photographic object P and the background photographic object Q are located within this depth of field 30 as shown in FIG. 16B, both the objects will be nearly focused. Thus, in this case, there is no necessity to create a pan-focus image. In the aforementioned cases, composite processing for creating a pan-focus image will become wasteful.
On the other hand, another digital cameras are equipped with a blur-control processing mode. In this blur-control processing mode, from a plurality of images focused on, for example, each of the foreground and the background different in focal distance, an image whose foreground image or background image is controlled in blur degree can be obtained. In the aforementioned blur-control processing, in cases where photographic objects P and Q whose images are to be taken by the digital camera 200 are located too close as shown in FIG. 17A, since the foreground and the background cannot be distinguished, it is difficult to perform the blur-control processing. Furthermore, in macro image taking shown in FIG. 17B, when the foreground focused image and the background focused image is greatly different in Image taking magnification, both the blur degree of the background Q in the foreground focused image and that of the foreground P in the background focused image will become large. In such a case, when blur-control processing is performed, an image whose foreground P and background Q are not distinguished clearly at the boundary thereof will be obtained. Even if blur-control processing is performed on these conditions, a wasteful image will be obtained.
Japanese Patent Unexamined Laid-open Publication No. 10-108057 discloses a constitution which takes a plurality of images to perform an image composition. In the aforementioned constitution, a pan-focus image will be created by taking a plurality of images focused on all photographic objects located within the predetermined range specified by photographic object distance information and then composing these images. On the other hand, when the range of distance measurement data is smaller than the depth of field, only one image will be taken.
However, with this constitution, even if all of the photographic objects are located within the depth of field, at least one image will be taken. Accordingly, the image processing and/or the image taking becomes wasteful.